package com.lzc.springcloud.msconsumeruser.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import com.lzc.springcloud.msconsumeruser.entity.User;
import com.lzc.springcloud.msconsumeruser.feign.UserFeignClient;
import com.lzc.springcloud.msconsumeruser.feign.UserFeignClient2;

@RestController
public class UserController {
	
	@Autowired
	private UserFeignClient userFeignClient;
	
	@Autowired
	private UserFeignClient2 userFeignClient2;
	
	@GetMapping("/getUser/{id}")
	public User getUser(@PathVariable Integer id) {
		
		return this.userFeignClient.getUser(id);
	}
	
	
	@GetMapping("/getUser2/{id}")
	public User getUser2(@PathVariable Integer id) {
		
		return this.userFeignClient2.getUser(id);
	}
	
}
